<?php

namespace app\admin\validate;

use think\Validate;

class Represent extends Validate
{
    protected $rule = [
        'id' => 'require',
        'name'=>'require',
        'gender'=>'require',
        'category'=>'require',
        'photo'=>'require',
        'position'=>'require'
    ];

    protected $scene=[
        'create'=>['name','gender','category','photo','position'],
        'update'=>['id','name','gender','category','photo','position'],
    ];

    protected $message = [
        'id' => 'ID不能为空',
        'name'=>'姓名不能为空',
        'gender'=>'性别不能为空',
        'category'=>'类型不能为空',
        'photo'=>'头像不能为空',
        'position'=>'职务不能为空'
    ];
}
